/**
 * Title: Hyperbolic engine
 * Description: jFamilyTree Engine
 * Version: provider
 * Copyright: (c) 2001-2008
 * Terms of use:see license agreement at http://treebolic.sourceforge.net/en/license.htm
 * Author: Bernard Bou
 * Company: bsys
 * Update: Mon Mar 10 00:00:00 CEST 2008
 */
package jFamilyTree.model;

import jFamilyTree.core.EuclidianLocation;
import jFamilyTree.core.HyperLocation;

/**
 * Node location in hyperspace and unit circle mapping
 * 
 * @author Bernard Bou
 */
public class Location
{
	// H Y P E R S P A C E

	/**
	 * Hyper location
	 */
	public final HyperLocation hyper;

	// E U C L I D I  A N . U N I T C I R C L E

	/**
	 * Unit circle location
	 */
	public final EuclidianLocation euclidian;

	// V I E W   D A T A

	/**
	 * Opaque view rendering data
	 */
	public Object theViewData;

	// C O N S T R U C T O R

	/**
	 * Construct
	 */
	public Location()
	{
		hyper = new HyperLocation();
		euclidian = new EuclidianLocation();
	}

	// T O  . U N I T . C I R C L E

	/**
	 * Map hyperspace to unit circle euclidian space
	 */
	public void mapToUnitCircle()
	{
		euclidian.set(hyper);

		// flag computation state
		hyper.isDirty = false;
	}
}
